Optimal. Leaf size=87 \[ \frac{2 c \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a}}\right )}{\sqrt{a} f}-\frac{2 \sqrt{2} c \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a \sec (e+f x)+a}}\right )}{\sqrt{a} f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.137723, antiderivative size = 87, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {3904, 3887, 481, 203} \[ \frac{2 c \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a}}\right )}{\sqrt{a} f}-\frac{2 \sqrt{2} c \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a \sec (e+f x)+a}}\right )}{\sqrt{a} f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3904
Rule 3887
Rule 481
Rule 203
Rubi steps
\begin{align*} \int \frac{c-c \sec (e+f x)}{\sqrt{a+a \sec (e+f x)}} \, dx &=-\left ((a c) \int \frac{\tan ^2(e+f x)}{(a+a \sec (e+f x))^{3/2}} \, dx\right )\\ &=\frac{(2 a c) \operatorname{Subst}\left (\int \frac{x^2}{\left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{f}\\ &=-\frac{(2 c) \operatorname{Subst}\left (\int \frac{1}{1+a x^2} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{f}+\frac{(4 c) \operatorname{Subst}\left (\int \frac{1}{2+a x^2} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{f}\\ &=\frac{2 c \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{\sqrt{a} f}-\frac{2 \sqrt{2} c \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a+a \sec (e+f x)}}\right )}{\sqrt{a} f}\\ \end{align*}
Mathematica [A] time = 0.276408, size = 82, normalized size = 0.94 \[ \frac{2 c \cot \left (\frac{1}{2} (e+f x)\right ) \sqrt{\sec (e+f x)-1} \left (\tan ^{-1}\left (\sqrt{\sec (e+f x)-1}\right )-\sqrt{2} \tan ^{-1}\left (\frac{\sqrt{\sec (e+f x)-1}}{\sqrt{2}}\right )\right )}{f \sqrt{a (\sec (e+f x)+1)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.219, size = 144, normalized size = 1.7 \begin{align*} -{\frac{c}{af}\sqrt{{\frac{a \left ( 1+\cos \left ( fx+e \right ) \right ) }{\cos \left ( fx+e \right ) }}}\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}} \left ( \sqrt{2}{\it Artanh} \left ({\frac{\sqrt{2}\sin \left ( fx+e \right ) }{2\,\cos \left ( fx+e \right ) }\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}} \right ) +2\,\ln \left ({\frac{1}{\sin \left ( fx+e \right ) } \left ( \sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sin \left ( fx+e \right ) -\cos \left ( fx+e \right ) +1 \right ) } \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.11928, size = 787, normalized size = 9.05 \begin{align*} \left [\frac{\sqrt{2} a c \sqrt{-\frac{1}{a}} \log \left (\frac{2 \, \sqrt{2} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt{-\frac{1}{a}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 3 \, \cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) + 1}\right ) - \sqrt{-a} c \log \left (\frac{2 \, a \cos \left (f x + e\right )^{2} + 2 \, \sqrt{-a} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right )}{a f}, \frac{2 \,{\left (\sqrt{2} \sqrt{a} c \arctan \left (\frac{\sqrt{2} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt{a} \sin \left (f x + e\right )}\right ) - \sqrt{a} c \arctan \left (\frac{\sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt{a} \sin \left (f x + e\right )}\right )\right )}}{a f}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} - c \left (\int \frac{\sec{\left (e + f x \right )}}{\sqrt{a \sec{\left (e + f x \right )} + a}}\, dx + \int - \frac{1}{\sqrt{a \sec{\left (e + f x \right )} + a}}\, dx\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]